package com.cloud.consul;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 奶茶
 * consul 注册中心
 * consul 下载：https://www.consul.io/downloads.html
 * 安装：解压->在path下加上解压路径
 * 启动：cmd->consul agent -dev
 * 访问：localhost:8500
 */
@SpringBootApplication
@EnableDiscoveryClient
@RestController
public class CloudRegisterConsulApplication {

	public static void main(String[] args) {
		SpringApplication.run(CloudRegisterConsulApplication.class, args);
	}

	@RequestMapping("/hi")
	public String home() {
		return "hi ,i'm miya";
	}
}
